package com.vincce.fitness.mappers.mgt;

import com.vincce.fitness.core.base.MyBatisRepository;
import com.vincce.fitness.entity.Admin;
import com.vincce.fitness.entity.Page;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Admin: lenovo
 * Date: 13-4-16
 * Time: 下午3:22
 * To change this template use File | Settings | File Templates.
 */
@MyBatisRepository
public interface AdminMapper {
    /**根据用户名称获取用户信息**/
    public Admin findAdminByName(String loginName);
    /**查询所有用户**/
    public List<Admin> findAdmin(Admin admin);
    /**添加用户角色**/
    public void addAdminRole(Map<String, Integer> map);
    /**添加用户**/
    public void addAdmin(Admin admin);
    /**更新用户信息**/
    public void updateAdmin(Admin user);
    /**删除用户角色**/
    public void deleteAdminRole(Integer adminId);
    /**删除角色**/
    void deleteAdmin(Integer id);



    /**查询用户数量**/
    public long findAdminCount(Page<Admin> page);



}
